package com.zhangtai.modules.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhangtai.modules.entity.employee.PromotionEntity;
import com.zhangtai.modules.entity.regular.RegularBpmEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2020-09-17 20:44:04
 */
@Mapper
public interface RegularBpmDao extends BaseMapper<RegularBpmEntity> {

    @Select("Select * from tb_regular_bpm where is_delete = 0 " +
            "and (regular_type = 2 or regular_type = 3) " +
            "and regular_bpm_status = 0 " +
            "and is_regular_remind = 0 " +
            "and TIMESTAMPDIFF(DAY,#{time},regular_day) <=30")
    List<RegularBpmEntity> sendRegularNotice(@Param("time") String time);



}

